#ifndef CONST_NAMES_H
#define CONST_NAMES_H

#include <QString>

// clang-format off
/**
 * @brief 操作名称常量定义
 * 集中管理所有操作的显示名称和内部标识符
 */
namespace OperationNames {
// 显示名称常量（用于UI显示）
    const QString SYSTEM_IDLE                        = "系统空闲";
    const QString COMMON_STOP                        = "停止设备";
    const QString COMMON_SET_TIME                    = "确定校时";

    // 预处理操作
    const QString PRE_PROCESS                        = "预处理";
    const QString PRE_ALGAE_REMOVAL                  = "除藻";
    const QString PRE_STEP_ALGAE_REMOVAL             = "单步除藻";
    const QString PRE_STEP_CLEAN                     = "单步清洗";
    const QString PRE_STEP_EMPTY_WATER               = "单步排空";
    const QString PRE_STEP_DRAW_WATER                = "单步抽水";
    const QString PRE_STEP_UPPER_WATER               = "单步配水";
    const QString PRE_STEP_SPIKE_VALVE_OPEN          = "开加标阀";
    const QString PRE_STEP_SPIKE_VALVE_CLOSE         = "关加标阀";

    // 常规设备操作
    const QString NORMAL_ZERO_CHECK                  = "零点核查";
    const QString NORMAL_STD_CHECK                   = "标液核查";
    const QString NORMAL_CALIB_FULL                  = "校正标定";
    const QString NORMAL_CALIB_1                     = "校正标一";
    const QString NORMAL_CALIB_2                     = "校正标二";
    const QString NORMAL_ANALYSIS                    = "水样测量";
    const QString NORMAL_CLEAN                       = "仪表清洗";

    // 加标仪操作
    const QString SPIKE_INTAKE                       = "启动加标";
    const QString SPIKE_INTAKE_STOP                  = "停止加标";
    const QString SPIKE_DRAIN                        = "启动清洗";
    const QString SPIKE_DRAIN_STOP                   = "停止清洗";
    const QString SPIKE_RECOVERY_START               = "加标回收";

    // 采样仪操作
    const QString SAMPLE_INTAKE                      = "启动采样";
    const QString SAMPLE_INTAKE_STOP                 = "停止采样";
    const QString SAMPLE_DRAIN                       = "排空所有瓶";
    const QString SAMPLE_DRAIN_PRE                   = "排空上一瓶";

    // 复合任务操作
    const QString TASK_ANALYSIS                      = "水样测量任务";
    const QString TASK_SPIKE_RECOVERY                = "加标回收任务";
}  // namespace OperationNames\

/**
 * @brief 错误名称常量定义
 * 集中管理所有错误的显示名称和内部标识符
 */
namespace ErrorNames {
    const QString COMMON_ERROR_NONE                  = "";
    // 预处理
    const QString PRE_ERROR_EMPTY_WATER              = "排空错误";
    const QString PRE_ERROR_CLEAN                    = "清洗错误";
    const QString PRE_ERROR_WATER_PUMP               = "抽水错误";
    const QString PRE_ERROR_WATER_MIX                = "配水错误";
    const QString PRE_ERROR_ALGAE_REMOVAL            = "除藻错误";
    const QString PRE_ERROR_OTHER                    = "其他错误";

    // 常规设备
    const QString NORMAL_ERROR_SYSTEM                = "系统故障";
    const QString NORMAL_ERROR_POWER                 = "电源故障";
    const QString NORMAL_ERROR_REAGENT               = "缺少试剂";
    const QString NORMAL_ERROR_WATER                 = "缺少蒸馏水";
    const QString NORMAL_ERROR_HEATING               = "加热故障";
    const QString NORMAL_ERROR_WASTE_DISPOSAL        = "排废故障";
    const QString NORMAL_ERROR_OVER_RANGE            = "测值超量程";
    const QString NORMAL_ERROR_OTHER                 = "其他错误";
    const QString NORMAL_ERROR_REAGENT_INSUFFICIENT  = "反应液不足";
    const QString NORMAL_ERROR_OTHER_ALARM           = "其他报警";

    // 加标仪
    const QString SPIKE_ERROR_FRIDGE_TEMP_LOW        = "冰箱温度过低";
    const QString SPIKE_ERROR_FRIDGE_TEMP_HIGH       = "冰箱温度过高";
    const QString SPIKE_ERROR_TEMPERATURE            = "温度故障";
    const QString SPIKE_ERROR_SCREEN_CONNECTION      = "屏连接失败";
    const QString SPIKE_ERROR_SPIKE_REAGENT_LOW      = "加标标液不足";
    const QString SPIKE_ERROR_MEASURE_REAGENT_LOW    = "测量标液不足";
    const QString SPIKE_ERROR_ZERO_LIQUID_LOW        = "零液不足";
    const QString SPIKE_ERROR_SPIKE_TANK_LOW         = "加标罐低液位故障";
    const QString SPIKE_ERROR_SPIKE_TANK_HIGH        = "加标罐高液位故障";
    const QString SPIKE_ERROR_MEASURE_LIQUID         = "测量液误差过大";
    const QString SPIKE_ERROR_ZERO_LIQUID            = "零液核查误差过大";
    const QString SPIKE_ERROR_SPIKE_RECOVERY_RATE    = "加标回收率误差过大";
    const QString SPIKE_ERROR_REAGENT_EXPIRED        = "试剂过期";

    // 采样仪
    const QString SAMPLE_ERROR_THERMOMETER           = "温度计故障";
    const QString SAMPLE_ERROR_FRIDGE_TEMP_OVER      = "冰箱温度超限";
    const QString SAMPLE_ERROR_DISTRIBUTOR_ARM       = "分配臂故障";
    const QString SAMPLE_ERROR_WATER_INSUFFICIENT    = "水量不足";
    const QString SAMPLE_ERROR_REAGENT_INSUFFICIENT  = "药品不足";
    const QString SAMPLE_ERROR_BOTTLE_FULL           = "瓶满";
    const QString SAMPLE_ERROR_FRIDGE_AUTO_PROTECT   = "冰箱自动保护";
    const QString SAMPLE_ERROR_LIFT_ROD              = "升降杆故障";
    const QString SAMPLE_ERROR_BOTTLE_DISTRIBUTE     = "分瓶故障";
}  // namespace ErrorNames

/**
 * @brief 设备状态名称常量定义
 * 集中管理所有设备的显示名称和内部标识符
 */
namespace StateNames {
    const QString STATE_IDLE                         = "空闲";

    // 预处理
    const QString PRE_STATE_IDLE                     = "空闲";
    const QString PRE_STATE_ALGAE_REMOVAL            = "除藻";
    const QString PRE_STATE_CLEAN                    = "清洗";
    const QString PRE_STATE_EMPTY_WATER              = "排空";
    const QString PRE_STATE_DRAW_WATER               = "抽水";
    const QString PRE_STATE_UPPER_WATER              = "配水";
    const QString PRE_STATE_SETTLE                   = "沉淀";

    // 常规设备
    const QString NORMAL_STATE_IDLE                  = "空闲";
    const QString NORMAL_STATE_RUNNING               = "运行";
    const QString NORMAL_STATE_MAINTENANCE           = "维护";
    const QString NORMAL_STATE_FAULT                 = "故障";
    const QString NORMAL_STATE_CALIB                 = "校正标定";
    const QString NORMAL_STATE_INSPECT               = "标液核查";
    const QString NORMAL_STATE_ANALYSIS              = "水样测量";
    const QString NORMAL_STATE_CALIBRATION           = "校正标定";
    const QString NORMAL_STATE_OPERATION             = "运维";
    const QString NORMAL_STATE_OTHER                 = "其他";

    // 加标仪
    const QString SPIKE_STATE_IDLE                   = "空闲";
    const QString SPIKE_STATE_DRAIN_BUFFER_TANK      = "缓存罐排空";
    const QString SPIKE_STATE_CLEAN_BUFFER_SLOT      = "缓存槽清洗";
    const QString SPIKE_STATE_BLOW                   = "鼓吹";
    const QString SPIKE_STATE_RINSE_BUFFER_TANK      = "缓存罐润洗";
    const QString SPIKE_STATE_ADD_REAGENT            = "添加试剂";
    const QString SPIKE_STATE_BUFFER_TANK_SAMPLE     = "缓存罐进样";
    const QString SPIKE_STATE_CLEAN_REAGENT_PIPE     = "试剂管路清洗";
    const QString SPIKE_STATE_ANALYZER_ANALYZING     = "分析仪分析中";

    // 采样仪
    const QString SAMPLE_STATE_IDLE                  = "空闲";                
    const QString SAMPLE_STATE_BOTTLE_RESET          = "瓶复位";         
    const QString SAMPLE_STATE_CONSTANT_FLOW_VOLUME  = "定流定量采样";        
    const QString SAMPLE_STATE_TIMED_PROPORTIONAL    = "定时比例采样";        
    const QString SAMPLE_STATE_TIMED_SAMPLING        = "定时采样";          
    const QString SAMPLE_STATE_VOLUME_SAMPLING       = "定量采样";          
    const QString SAMPLE_STATE_BOTTLE_DRAIN          = "瓶排空";           

}  // namespace StateNames

/**
 * @brief 设备配置
 * 定义所有设备的配置项名称
 */
namespace ConfigNames {
    // 预处理
    const QString PRE_CONFIG_DRAW_WATER_TIME         = "抽水时间";
    const QString PRE_CONFIG_UPPER_WATER_TIME        = "配水时间";
    const QString PRE_CONFIG_EMPTY_WATER_TIME        = "排空时间";
    const QString PRE_CONFIG_CLEAN_WATER_TIME        = "清洗时间";
    const QString PRE_CONFIG_CLEAN_ALGAE_TIME        = "除藻时间";
    const QString PRE_CONFIG_DRAW_ALGAE_TIME         = "抽除藻剂时间";
    const QString PRE_CONFIG_SETTLE_TIME             = "沉淀时间";
    const QString PRE_CONFIG_DRAIN_PUMP_SELECTION    = "抽水泵选择";

    // 常规设备配置项
    const QString NORMAL_CONFIG_RANGE_LOWER_LIMIT    = "测量下限";
    const QString NORMAL_CONFIG_RANGE_UPPER_LIMIT    = "测量上限";

    //加标仪配置项
    const QString SPIKE_CONFIG_MULTIPLIER            = "加标倍数";
    const QString SPIKE_CONFIG_CONCENTRATION         = "加标液浓度";
    const QString SPIKE_CONFIG_VOLUME                = "加标罐有效体积";
}  // namespace DeviceConfigNames
#endif  // CONST_NAMES_H